package org.cargloss.cp.controller.modul.event;

import org.cargloss.cp.model.Event;

import util.hibernate.DAO;

import com.opensymphony.xwork2.ActionSupport;

public class ActionObject extends ActionSupport {
	/**
         *
         */
	private static final long serialVersionUID = 1L;

	private Event event;
	private int id;

	public String execute() {
		DAO<Integer> dao = new DAO<Integer>();
		dao.createCriteria(Event.class);
		dao.addFilter("eq", "id", id);
		event = (Event) dao.findUnique();
		dao.close();
		return SUCCESS;
	}

	public Event getEvent() {
		return event;
	}

	public void setEvent(Event event) {
		this.event = event;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

}
